/*
 * description: 租赁接口
 * author: Muze
 */

import request from '../utils/request'

// 商城商品列表
export function getGoodsList(params) {
	return request.get('score_goods/lists', {
		params
	});
}


// 商品详情
export function getScoreGoodsDetail(params) {
	return request.get('score_goods/details', {
		params
	});
}
export function getScoreGoodsDetailBySn(params) {
	return request.get('score_order/detailsOrderSn', {
		params
	});
}
//确认收货
export function confirmOrder(id) {
	return request.post("score_order/confirm", {
		id
	})
}//确认收货
export function confirmHexiao(params) {
	return request.post("score_order/confirmHexiao", params)
}


// 结算详情/提交订单
export function orderScoreBuy(params) {
	return request.post('score_order/buy', params);
}

export function getOrderList(data) {
	return request.get('score_order/lists', {
		params: data
	});
}



// 物流详情
export function getLeaseOrderExpress(params) {
	return request.get('lease_order/orderTraces', {
		params
	});
}

// 取消订单
export function leaseOrderCancel(params) {
	return request.post('lease_order/cancel', params);
}

// 商品评论
export function addLeaseGoodsComment(params) {
	return request.post('lease_goods_comment/addLeaseGoodsComment', params);
}

// 删除订单
export function leaseOrderDel(params) {
	return request.post('lease_order/del', params);
}

// 确认收货
export function leaseOrderConfirm(params) {
	return request.post('lease_order/confirm', params);
}

// 获取租赁商品收藏列表
export function getLeaseCollectGoods() {
	return request.get('lease_goods_collect/getCollectGoods');
}

// 还款账单
export function repaymentBill(params) {
	return request.post('lease_order/repaymentBill', params);
}

// 续租
export function leaseOrderRelet(params) {
	return request.post('lease_order/relet', params);;
}

// 换租 选择租期
export function lendleasePeriods(params) {
	return request.get('lease_goods/rentChangeDetails', {
		params
	});
}

// 换租下单
export function lendleaseOrder(params) {
	return request.post('lease_order/rentChangeBuy', params);
}

// 还机验证
export function leaseReturnCheck(params) {
	return request.post('lease_order/returnCheck', params);
}

// 还机账单
export function leaseReturnBill(params) {
	return request.post('lease_order/returnBill', params);
}

// 还机详情
export function leaseReturnDetail(params) {
	return request.post('lease_order/returnDetail', params);
}

// 还机寄件
export function leaseReturnMail(params) {
	return request.post('lease_order/mail', params);
}

// 买断
export function leaseBuyOut(params) {
	return request.post('lease_order/buyOut', params);
}

// 买断详情
export function leaseBuyOutDetail(params) {
	return request.post('lease_order/buyOutDetail', params);
}

// 租赁协议
export function getLeaseProtocol() {
	return request.get('policy/lease');
}

// 租赁合同详情
export function getLeaseContractDetail(params) {
	return request.post('lease_order/contractDetail', params);
}

// 租赁合同提交
export function leaseContractSubmit(params) {
	return request.post('lease_order/submitContract', params);
}

// 查询物流进度【还机|回收】
export function queryExpressProgress(params) {
	return request.get('lease_order/logisticsInfo', {
		params
	});
}

/**
 * 获取网点列表
 * @param {Object} params
 */
export function getAgentList(params) {
	return request.get('/city/branches', {
		params
	});
}

/**
 * 获取城区列表
 * @param {Object} params
 */
export function getCountyList(params) {
	return request.get('city/tabcity', {
		params
	});
}

/**
 * 获取服务网点列表
 * @param {Object} params
 */
export function getfwwdList(params) {
	return request.get('city/fwwd', {
		params
	});
}

/**
 * 获取服务网点详情
 * @param {Object} params
 */
export function getfwwdDetail(params) {
	return request.get('city/getfwwd', {
		params
	});
}

/**
 * 获取服务网点列表
 */
export function getWdType() {
	return request.get('city/fwwdtye');
}


export function xinyongpdf(params) {
	return request.get('lease_order/xinyongpdf', {
		params
	});
}

export function sign(params) {
	return request.post('lease_order/sign', params);
}
